
/**
* 
* ====================================================================
*
* @author apov <apov@ymail.com>
*/ 
// RoomToRoom.h
//

#pragma once

#include "BaseDefine.h"

class Room;
class User;
class RoomToRoom{
public:
	virtual int enter( const char* data, User* user, Room* to_room ) = 0;

	RoomToRoom(){};
	virtual ~RoomToRoom(){};

protected:
private:
};

class RoomToRoom_Decorator : public RoomToRoom{
public:
	int enter( const char* data, User* user, Room* to_room ){
		if( preProcess_ )
			return preProcess_->enter( data, user, to_room );

		return 0;
	}

	RoomToRoom_Decorator( RoomToRoom* preProcess ){
		preProcess_ = preProcess;
	}

	virtual ~RoomToRoom_Decorator(){};

protected:

private:
	RoomToRoom* preProcess_;
};
